package com.chisheng.caa.exception;

import com.chisheng.caa.pojo.response.ResponseCode;

/**
 * CAA 运行时异常
 */
public abstract class CaaException extends RuntimeException {

    /**
     * 异常处理响应状态码
     */
    protected ResponseCode code;

    public CaaException(String message) {
        this(ResponseCode.FAILURE, message);
    }

    public CaaException(ResponseCode code, String message) {
        super(message);
        this.code = code;
    }

    public ResponseCode getCode() {
        return code;
    }

}
